package com.test;

/*
class Animal {
    // 使用final关键字修饰shout()方法
    public final void shout() {
        System.out.println("动物的叫声");
    }
}

// 定义Dog类继承Animal类
class Dog extends Animal {
    // 重写Animal类的shout()方法
    //'shout()' cannot override 'shout()' in 'com.test.Animal';
    // overridden method is final
    public void shout() {
    }
}


public class Example03 {
    public static void main(String[] args) {
        Dog dog = new Dog(); // 创建Dog类的对象
    }
}


 */